<?php defined('APP_PATH') or exit('Access Denied');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>字段列表</title>
<link rel="stylesheet" type="text/css" href="vonuo/static/css/vonuo.css">
<script type="text/javascript" src="vonuo/static/js/jquery.min.js"></script>
<script type="text/javascript" src="vonuo/static/js/tablecolor.js"></script>
</head>

<body>
<div class="gs_wraper gs_p_l0">
	<div class="title">
		<a href="javascript:;" class="hover">字段列表</a>
		<a href="<?php echo spUrl('field','add',array('modelid'=>$modelid));?>">添加字段</a>
		<a href="javascript:;">预览模型</a>
	</div>
	<div class="tab_box" id="con_one_1">
		<table width="100%" style="margin-top:10px;" border="0" cellpadding="0" cellspacing="0"  class="common_table">
			<tr>
				<th width="70"><input type="checkbox" onclick="$('.all_check').attr('checked',$(this).attr('checked'))" class="all_check" /><label>编号</label></th>
				<th width="70">所属模型</th><th width="70">字段</th><th width="70">名称</th><th width="70">类型</th><th width="70">排序</th><th width="100">备注</th><th width="100">字段管理</th>
			</tr>
			<form action="<?php echo spUrl('field','updod',array('modelid'=>$modelid));?>" method="post">
			<?php foreach($field as $row){?>
			<tr>
				<td><input name="id[]" type="checkbox" value="<?php echo $row['fieldid'];?>" class="all_check" /><label><?php echo $row['fieldid'];?></label></td>
				<td><?php echo $row['model']['modelname'];?></td>
				<td><?php echo $row['field'];?></td><td><?php echo $row['name'];?></td>
				<td><?php echo $row['type']['name'];?></td><input type="hidden" name="idrow[]" value="<?php echo $row['fieldid'];?>" />
				<td><input name="odnum[]" type="text" class="blue_input input_w_40" value="<?php echo $row['odnum'];?>"/></td>
				<td><?php echo $row['tips'];?></td><?php if($row['canupd'] == 0){?><td>[禁止操作]</td><?php }else{?>
				<td><a href="<?php echo spUrl('field','upd',array('fieldid'=>$row['fieldid']));?>">[编辑]</a><a href="<?php echo spUrl('field','del',array('fieldid'=>$row['fieldid']));?>" onclick="return confirm('确定删除？');">[删除]</a></td>
				<?php }?>
			</tr>
			<?php }?>
			</form>
			<tr class="bottom">
				<td colspan="8" align="left" valign="middle">
					<a href="javascript:;" onclick="$('form').submit()" class="btn_wei f_left">更新排序</a>
				</td>
			</tr>
  		</table>
	</div>
</div>
</body>
</html>